(function () {
  $.get("./list.do", function (list) {
    var html = '';
    if (list.length > 0) {
      $.each(list, function (i, item) {
        i++;
        var editLink = '<a href="./edit.html?hashId=' + item._id + '">编辑</a>';
        var deleteLink = '<a href="javascript:void(0);" onclick=deleteApi("' + item._id + '","' + item.name + '")>删除</a>';
        html += '<tr><td>' + i + '</td><td>' + item.tmsPath + '</td><td>' + item.tmsPath + '</td><td>' + editLink + '&nbsp;|&nbsp;' + deleteLink + '</td></tr>';
      });
    } else {
      html = '<tr><td colspan="4">没有接口</td></tr>';
    }
    $("#list-table").append(html);
  });
})();